package com.linkage.bss.crm.packagemgr.util;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
import net.sf.json.util.PropertyFilter;

import com.opensymphony.xwork2.ActionSupport;

/**
 * JQUERY DATAGRID 分页查询管理类
 * @ClassName: DataGridManager.java
 * @Description: DataGridManager.java
 * @author: JinShuming
 * @date 2012-7-10
 */
public class DataGridManager extends ActionSupport{

	private static final long serialVersionUID = 1L;

	protected JSONObject result;// 返回的json

	protected int rows;// 每页显示的记录数

	protected int page;// 当前第几页
	
	protected JsonConfig jsonConfig = new JsonConfig();
	
	protected JSONArray arrayResult;
	
	public DataGridManager(){
		 jsonConfig.setJsonPropertyFilter(new PropertyFilter() {
            public boolean apply(Object source, String name, Object value) {
                if (value == null) {
                    return true;
                }
                return false;
            }
        });
	}

	public JSONObject getResult() {
		return result;
	}

	public void setResult(JSONObject result) {
		this.result = result;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}
	
	public JSONArray getArrayResult() {
		return arrayResult;
	}

	public void setArrayResult(JSONArray arrayResult) {
		this.arrayResult = arrayResult;
	}
}
